<?php /* Template_ 2.2.4 2011/07/05 18:33:29 E:\PHP\www\sagapo\_DATA\template_\default\admin\board\add.html 000006830 */ 
$TPL_skin_1=empty($TPL_VAR["skin"])||!is_array($TPL_VAR["skin"])?0:count($TPL_VAR["skin"]);?>
<h2 class="<?php echo $TPL_VAR["module"]?>">게시판 관리</h2>
<section class="default">
	<script>
		$(function() {
			$('#<?php echo $TPL_VAR["module"]?>_add :radio').checkbox({empty:'<?php echo $TPL_VAR["CFG"]->PATH->CSS?>/images/empty.png'});
			$("#<?php echo $TPL_VAR["module"]?>_add").validate();
			
			$("#<?php echo $TPL_VAR["module"]?>_overlap").click(function() {
				ids = $("#<?php echo $TPL_VAR["module"]?>_id");
				
				if(ids.valid()) {
					url = "<?php echo $TPL_VAR["CFG"]->PATH->WWW?>/<?php echo $TPL_VAR["CFG"]->PATH->ADMIN?>/<?php echo $TPL_VAR["module"]?>/getID/"+ids.val();
					$.ajax({url:url, success:function(data){
						if(mesg.success == data.code) {
							if(confirm(data.msg)) {
								$("#<?php echo $TPL_VAR["module"]?>_id2").val(ids.val());
							} else {
								ids.val("").focus();	
							}
						} else {
							alert(data.msg);
							ids.val("").focus();
						}
					}});
				} else {
					ids.focus();
				}
				return false;
			});
		});
	</script>
	<form name="<?php echo $TPL_VAR["module"]?>_add" id="<?php echo $TPL_VAR["module"]?>_add" method="post" action="doAdd">
		<table class="table">
			<caption>
				게시판 추가
			</caption>
			<colgroup>
				<col class="t_add" />
				<col />
			</colgroup>
			<tbody>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_id">게시판 아이디</label></th>
					<td>
						<input type="text" name="<?php echo $TPL_VAR["module"]?>_id" id="<?php echo $TPL_VAR["module"]?>_id" class="required" placeholder="게시판 아이디" />
						<input type="hidden" name="<?php echo $TPL_VAR["module"]?>_id2" id="<?php echo $TPL_VAR["module"]?>_id2" placeholder="게시판 중복확인 체크" class="required" />
						<button type="button" class="accept" id="<?php echo $TPL_VAR["module"]?>_overlap">중복확인</button>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_name">게시판 명</label></th>
					<td><input type="text" name="<?php echo $TPL_VAR["module"]?>_name" id="<?php echo $TPL_VAR["module"]?>_name" class="input_90_pc required" placeholder="게시판 명" /></td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_skin">스킨</label></th>
					<td>
						<select name="<?php echo $TPL_VAR["module"]?>_skin">
<?php if($TPL_skin_1){foreach($TPL_VAR["skin"] as $TPL_V1){?>
							<option value="<?php echo $TPL_V1?>"><?php echo $TPL_V1?></option>
<?php }}?>
						</select>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_category_on">카테고리</label></th>
					<td>
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_category" id="<?php echo $TPL_VAR["module"]?>_category_on" value="1" checked="checked" />
						<label for="<?php echo $TPL_VAR["module"]?>_category_on">사용</label>
						&nbsp;&nbsp;
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_category" id="<?php echo $TPL_VAR["module"]?>_category_off" value="0" />
						<label for="<?php echo $TPL_VAR["module"]?>_category_off">미사용</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_footlist_on">하단리스트</label></th>
					<td>
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_footlist" id="<?php echo $TPL_VAR["module"]?>_footlist_on" value="1" checked="checked" />
						<label for="<?php echo $TPL_VAR["module"]?>_footlist_on">사용</label>
						&nbsp;&nbsp;
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_footlist" id="<?php echo $TPL_VAR["module"]?>_footlist_off" value="0" />
						<label for="<?php echo $TPL_VAR["module"]?>_footlist_off">미사용</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_newicontime">새글강조시간</label></th>
					<td>
						<input type="number" name="<?php echo $TPL_VAR["module"]?>_newicontime" id="<?php echo $TPL_VAR["module"]?>_newicontime" value="24" class="input_30_px required"  max="168" min="1" />
						시간 단위로 입력해주세요.
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_attach_on">첨부파일</label></th>
					<td>
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_attach" id="<?php echo $TPL_VAR["module"]?>_attach_on" value="1" checked="checked" />
						<label for="<?php echo $TPL_VAR["module"]?>_attach_on">사용</label>
						&nbsp;&nbsp;
						<input type="radio" name="<?php echo $TPL_VAR["module"]?>_attach" id="<?php echo $TPL_VAR["module"]?>_attach_off" value="0" />
						<label for="<?php echo $TPL_VAR["module"]?>_attach_off">미사용</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_listing">리스트 갯수</label></th>
					<td>
						<input type="number" name="<?php echo $TPL_VAR["module"]?>_listing" id="<?php echo $TPL_VAR["module"]?>_listing" value="15" class="input_30_px required" max="30" min="5" />
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_paging">페이징 갯수</label></th>
					<td>
						<input type="number" name="<?php echo $TPL_VAR["module"]?>_paging" id="<?php echo $TPL_VAR["module"]?>_paging" value="10" class="input_30_px required" max="25" min="5" />
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_thumb_width">썸네일 가로</label></th>
					<td>
						<input type="number" name="<?php echo $TPL_VAR["module"]?>_thumb_width" id="<?php echo $TPL_VAR["module"]?>_thumb_width" value="450" class="input_50_px required"  max="700" /> px
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="<?php echo $TPL_VAR["module"]?>_thumb_height">썸네일 세로</label></th>
					<td>
						<input type="number" name="<?php echo $TPL_VAR["module"]?>_thumb_height" id="<?php echo $TPL_VAR["module"]?>_thumb_height" value="300" class="input_50_px required"  max="700" /> px
					</td>
				</tr>
			</tbody>
		</table>
		<div class="button_area">
			<button type="submit">전송</button>
			<button type="button" class="cancel" onclick="history.back(-1)">뒤로</button>
		</div>
	</form>
</section>